<%@ include file="/WEB-INF/jsp/include.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="/spring"%>
<html>
<head>
<title><fmt:message key="msg.bp.page.add.title" /></title>
</head>
<body>
<center><form:form method="post" commandName="bpDetailsBean">
	<table width="80%" border="1">
		
		<c:forEach items="${bpDetailsBean.chkboxlist}"  var="chkboxelement" >
		 <c:out value="${chkboxelement}" />
		
		</c:forEach>
		
		  chkboxlist
		
		<tr><td>
		<form:checkboxes path="selectedlist" items = "${bpDetailsBean.chkboxlist}" /> 
		</td></tr>
		<tr>
			<td align="center" bgcolor="lightblue">Add New Business Partner	Details</td>
		</tr>
		<tr>
			<td>
			<table border="2" width="100%">
				<tr>
				</tr>
				<tr>
					<spring:bind path="bpDetailsBean.bp_fname">
						<td width="33%" align="right">First Name</td>
						<td width="66%" align="left">
							<input type="text" value="<c:out value="${status.value}"/>"
								name="<c:out value="${status.expression}"/>" >
							<c:if test="${status.error}">
                				<c:forEach items="${status.errorMessages}" var="error">
                				  <font color ="red"><c:out value="${error}"/> </font>
                				</c:forEach>
							</c:if>			
						</td>
					</spring:bind>
				</tr>
				<tr>
					<spring:bind path="bpDetailsBean.bp_mname">
						<td width="33%" align="right">Middle Name</td>
						<td width="66%" align="left">
							<input type="text" value="<c:out value="${status.value}"/>"
								name="<c:out value="${status.expression}"/>" >
						</td>
					</spring:bind>
				</tr>
				<tr>
					<spring:bind path="bpDetailsBean.bp_lname">
						<td width="33%" align="right">Last Name</td>
						<td width="66%" align="left">
							<input type="text" value="<c:out value="${status.value}"/>"
								name="<c:out value="${status.expression}"/>" >
							<c:if test="${status.error}">
                				<c:forEach items="${status.errorMessages}" var="error">
                				  <font color ="red"><c:out value="${error}"/> </font>
                				</c:forEach>
							</c:if>			
						</td>
					</spring:bind>
				</tr>
				<tr>
					<spring:bind path="bpDetailsBean.bp_address.addr1">
						<td width="33%" align="right">Address Line 1</td>
						<td width="66%" align="left">
							<input type="text" value="<c:out value="${status.value}"/>"
								name="<c:out value="${status.expression}"/>" >
							<c:if test="${status.error}">
                				<c:forEach items="${status.errorMessages}" var="error">
                				  <font color ="red"><c:out value="${error}"/> </font>
                				</c:forEach>
							</c:if>			
						</td>
					</spring:bind>
				</tr>
				<tr>
					<spring:bind path="bpDetailsBean.bp_address.addr2">
						<td width="33%" align="right">Address Line 2</td>
						<td width="66%" align="left">
							<input type="text" value="<c:out value="${status.value}"/>"
								name="<c:out value="${status.expression}"/>" >
							<c:if test="${status.error}">
                				<c:forEach items="${status.errorMessages}" var="error">
                				  <font color ="red"><c:out value="${error}"/> </font>
                				</c:forEach>
							</c:if>			
						</td>
					</spring:bind>
				</tr>
				<tr>
					<spring:bind path="bpDetailsBean.bp_address.country">
						<td width="33%" align="right">Country</td>
						<td width="66%" align="left">
							<input type="text" value="<c:out value="${status.value}"/>"
								name="<c:out value="${status.expression}"/>" >
							<c:if test="${status.error}">
                				<c:forEach items="${status.errorMessages}" var="error">
                				  <font color ="red"><c:out value="${error}"/> </font>
                				</c:forEach>
							</c:if>			
						</td>
					</spring:bind>
				</tr>
				<tr>
					<spring:bind path="bpDetailsBean.bp_address.state">
						<td width="33%" align="right">State</td>
						<td width="66%" align="left">
							<input type="text" value="<c:out value="${status.value}"/>"
								name="<c:out value="${status.expression}"/>" >
							<c:if test="${status.error}">
                				<c:forEach items="${status.errorMessages}" var="error">
                				  <font color ="red"><c:out value="${error}"/> </font>
                				</c:forEach>
							</c:if>			
						</td>
					</spring:bind>
				</tr>

				<tr>
					<spring:bind path="bpDetailsBean.bp_address.city">
						<td width="33%" align="right">City</td>
						<td width="66%" align="left">
							<input type="text" value="<c:out value="${status.value}"/>"
								name="<c:out value="${status.expression}"/>" >
							<c:if test="${status.error}">
                				<c:forEach items="${status.errorMessages}" var="error">
                				  <font color ="red"><c:out value="${error}"/> </font>
                				</c:forEach>
							</c:if>			
						</td>
					</spring:bind>
				</tr>

				<tr>
					<td align="center" colspan="2">
						<input type="submit"  align="middle" value="Submit"> 
						<input type="button"  align="middle" value="Reset" onclick="alert('Not Implemented Yet');">
					
</td>
				</tr>
				<tr>
					<td align="center" colspan="2"><font color="red"><form:errors
						path="errors" /></font></td>
				</tr>
			</table>
			</td>
		</tr>
	</table>
</form:form></center>
</body>
</html>